﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using DevMed.Library;
using DevMed.Models;
using System.Web.Security;
using System.Web.Routing;
using System.Data.SqlClient;

namespace DevMed.Library
{
    public class Apoio
    {
        public bool IsUserClinica(string UserName)
        {
            Conexao conexao = new Conexao("aspnet_Users");
            conexao.AdicionaParametro("UserName", UserName);
            SqlDataReader reader = conexao.ExecutaSelect(Comandos.GetClinica);

            if(reader.HasRows)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}